package slash.game;

import java.util.ArrayList;
import java.util.List;

/**
 * @author gsh
 */
public class Cell {

	private Terrain terrain = Terrain.None;
	private Board board;
	private int x;
	private int y;

	// Things that are in the cell (monsters/loot/gold etc)
	private List<Entity> contents = new ArrayList<Entity>();

	public Cell(Board board, int x, int y) {
		this.board = board;
		this.x = x;
		this.y = y;
	}

	public Terrain getTerrain() {
		return terrain;
	}

	public void setTerrain(Terrain t) {
		terrain = t;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}
	
	public Board getBoard() {
		return board;
	}

	public List<Entity> getContents() {
		return contents;
	}
	
	public String toString() {
		return "Cell("+x+","+y+"): "+contents.size();
	}
}
